<template>
	<view class="stickyBox">
		<view class="user" @click="goMy">
			<view class="user_avatar">
				<u-avatar :src="data.userInfo.avatar" default-url="../../static/avatar.png"></u-avatar>
				<text style="margin-left: 12rpx;">{{data.userInfo.nickName}}</text>
			</view>
			<u-icon name="arrow-right"></u-icon>
		</view>
	</view>
</template>

<script lang="ts" setup>
	import { reactive } from "vue";
	import { onShow, onLoad, onPageScroll, onReachBottom, onUnload } from "@dcloudio/uni-app";
	const data : any = reactive({
		userInfo: {},
	});
	onLoad(() => {
		data.userInfo = uni.getStorageSync('userInfo');
	})
	const goMy = () => {
		uni.navigateTo({
			url: '/pages/my/my'
		})
	}
</script>

<style lang="scss">
	.stickyBox {
		background: #FFFFFF;
		margin-bottom: 28rpx;
		width: 100%;
		padding-top: 24rpx;
		overflow: hidden;
	}

	.user {
		background: #FFFFFF;
		box-shadow: 0px 11px 17px 0px #DAEBFF;
		border-radius: 26rpx 26rpx 26rpx 26rpx;
		border: 1px solid #DAEBFF;
		margin: 24rpx;
		margin-top: 0;
		padding: 24rpx;
		display: flex;
		justify-content: space-between;

		.user_avatar {
			display: flex;
			align-items: center;
			font-size: 1.125rem;
			font-weight: bold;

		}
	}
</style>